package cn.xxstudy.visitshop.util

import android.content.Context
import android.widget.ImageView
import androidx.databinding.BindingAdapter

/**
 * @author ：DELL on 2021/3/25 .
 * @packages ：cn.xxstudy.visitshop.util .
 * TODO: DataBinding为view自定义属性
 */

@BindingAdapter("imageUrl")
fun loadImage(img: ImageView, url: String?) {
    url?.let { img.load(img.context, "http://192.168.1.14:8000$it") }
}